POV-Ray : Newsgroups : povray.newusers : Normals in Pov : Re: Normals in Pov Server Time
5 Sep 2024 20:17:46 EDT (-0400)
  Re: Normals in Pov  
From: Warp
Date: 19 Jul 2000 04:50:24
Message: <39756bd0@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: I think the bug fix was added in 3.1b along with some double-illuminate 
: stuff:
: "Fixed average normal bug and other normal flipping problems"

  But flipping the normal vector of a (non-smooth) triangle is NOT a bug! It's
the right behaviour.
  Think about a plane { y, 0 }. If you put a light source at y*10 it will
illuminate the top of the plane and the bottom will be shadowed. If you put
the light source at y*-10, it will be the other way around.
  Now, this same behavior has to happen with regular triangles as well. If
the light source is at one side of the triangle, that side has to be
illuminated and the other shadowed. It doesn't matter which side.
  To achieve this, the normal vector has to be flipped to point to the side
where the light source is. If the normal vector were pointing to the wrong
side, the side of the triangle which is facing the light source would be
shadowed, which is the wrong result.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.